#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int x;
	cin >> x;
	x += 2;
	cout << (x > 7 ? x - 7 : x);
	return 0;
}
